#ifndef MANAGER_IMPL_H
#define MANAGER_IMPL_H

#include "reader.h"
#include "manager.h"
#include "book.h"
#include "tools.h"
#include "userdao_impl.h"
#include "bookdao_impl.h"
using namespace std;
class ManagerImpl:public Manager
{

	int m_id;
	char m_name[20];
	vector<Book> book;
	vector<Reader> reader;
	UserDaoImpl* user;
	BookDaoImpl* books;
public:
	//构造函数
	ManagerImpl(int id=0,const char* name="");
	//添加书本
	bool AddBook(Book& b);
	//借书
	bool BorrowBook(int b_id,int a_id);
	//还书
	bool ReturnBook(int b_id,int u_id);
	//显示
	void ShowBook(void);
	//预约
//	bool appointBook(int b_id,int a_id);
	void AddReader(Reader& r);
	void DelReader(void);
	void ShowReader(void);
	int SetMoney(int cash,int u_id);
	void save(void);
	//析构函数
	~ManagerImpl();

};
#endif
